﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SEG.Model;
using SEG.ServiceLogic;
using Common.UI.EM;
using SEG.UI.Control.Views;
using SEG.UI.Control.Presenters;

namespace SEG.UI.Control
{
    public class AdministrarGruposController : GenericEntityController<AdministrarGruposServiceLogic, Grupo, AdministrarGruposCriteria, AdministrarGruposView>
    {
        public override string Title
        {
            get
            {
                return "Administrar grupos";
            }
        }

        protected override Common.UI.EM.Views.DetailDataView CreateDetailDataView()
        {
            return new AdministrarGruposDetailDataView();
        }

        protected override Common.UI.EM.Views.FilterDataView CreateFilterDataView()
        {
            return new AdministrarGruposFilterDataView();
        }

        protected override void CreateEntityPresentationModel()
        {
            this.EntityPresentationModel = new AdministrarGruposEntityPresentationModel(this.CreateFilterView(), this.CreateListView(), this.CreateDetailView());
        }

        protected override void AddColumnDefinitions()
        {
            this.EntityPresentationModel.AddColumnDefinition(AdministrarGruposView.CodigoPropertyname, "Código");
            this.EntityPresentationModel.AddColumnDefinition(AdministrarGruposView.NombrePropertyname, "Nombre");
            this.EntityPresentationModel.AddColumnDefinition(AdministrarGruposView.EstaActivoStringPropertyname, "Esta activo");
        }
    }
}
